<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <div ref="a" id="box">111</div>
    <span ref="b">222</span>
    <button ref="c">333</button>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el:"#app",
      mounted(){
       console.log(this.$refs)
       this.$refs.a.style.background="red"
      }
    })
  </script>
</body>
</html>
